package com.autoMobile.servlet;

import com.autoMobile.bean.Vehicle;
import com.autoMobile.dao.VehicleDao;
import com.autoMobile.util.listData;

import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.annotation.*;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;

@WebServlet(name = "VehListServlet", value = "/Veh/VehListServlet")
public class VehListServlet extends HttpServlet {
    @Override
    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        doPost(request,response);
    }

    @Override
    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        new listData().vehList(request,response,getServletContext());
        response.sendRedirect(request.getContextPath()+"/admin/vehicle-management.jsp");
    }
}
